﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using jmwqz.ajax;

namespace jmwqz
{
    public partial class duihuan : System.Web.UI.Page
    {
        private Maticsoft.BLL.tb_userdata buser = new Maticsoft.BLL.tb_userdata();
        private Maticsoft.Model.tb_userdata muser = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    int userid = 0;
                    if (!string.IsNullOrEmpty(Session["userid"].ToString()))
                    {
                        int.TryParse(Session["userid"].ToString(), out userid);
                    }
                    int.TryParse(Session["userid"].ToString(), out userid);


                    muser = buser.GetModel(userid);
                }
            }
            catch
            {
                Response.Redirect("http://www.jmvqz.cn/index12.php?page2=jifencenter");
            }
        }

        public string GetTj_num()
        {
            if (muser != null)
            {
                return muser.tj_num.ToString();
            }
            return "";
        }

        public string GetJifen()
        {
            if (muser != null)
            {
                return (muser.jifen + muser.freezejifen).ToString();
            }
            return "";
        }

        public string GetGzDate()
        {
            if (muser != null)
            {
                return muser.gz_time.ToString("yyyy-MM-dd hh:mm");
            }
            return "";
        }

        public string GetNickName()
        {
            if (muser != null)
            {
                return muser.realname;
            }
            return "";
        }

        public string GetHeadImg()
        {
            if (muser != null)
            {
                return muser.imgurl;
            }
            return "";
        }
    }
}